package com.example.guethe.fireanalysisapp.data.net;

import com.example.guethe.fireanalysisapp.data.beans.BaseListResponse;
import com.example.guethe.fireanalysisapp.data.beans.BaseResponse;
import com.example.guethe.fireanalysisapp.data.beans.CataLog;
import com.example.guethe.fireanalysisapp.data.beans.CataLogResponse;
import com.example.guethe.fireanalysisapp.data.beans.Device;
import com.example.guethe.fireanalysisapp.data.beans.User;

import io.reactivex.Flowable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * Created by 何建钦 on 2018/2/2.
 */

public interface MyService {
    // 登录
    @POST("api/mobile/user/login")
    Flowable<BaseResponse<User>> login(
            @Body User user
    );
    //退出
    @POST("api/mobile/user/logout")
    Flowable<BaseResponse<User>> logout(
            @Body User user
    );


    //获取告警设备
    @GET("api/mobile/log")
    Flowable<BaseListResponse<CataLog>> getLog(
            @Query("page")int page,
            @Query("size") int size

    );
    @GET("api/mobile/device/list")
    Flowable<BaseListResponse<Device>> getDevice(
            @Query("page")int page,
            @Query("size") int size,
            @Query("type") String type
            );
}
